<{include file="head.html"}>
            <div class="main">
                <script>
                    $(function(){
                        $("#dh > li").not($("#moretype")).find("span").toggle(function(){
                            pid=$(this).parent().find("p").text();
                            x=$(this).parent().offset();
                            $("#childtypes").load('<{$config.SITE_URL}>/ajax.php?action=childtypes&pid='+pid).css("top",x.top+30).fadeIn();
                            $(this).parent().find("span").text("-");
                            
                        },function(){
                            $("#childtypes").html("");
                            $("#childtypes").fadeOut();
                            $(this).parent().find("span").text("+");
                        });
                        
                    })
                </script>
                <div class="index_dh">
                    <div id="childtypes"></div>                                                         
                    <ul id="dh">
                        <{section name=i loop=$types}>
                            
                        <li><p style="display:none;"><{$types[i].id}></p><a href="<{$config.SITE_URL}>/type.php?id=<{$types[i].id}>"><{$types[i].name}></a><span>+</span></li>
                            
                        <{/section}>                        
                        <li id="moretype">更多分类...</li>
                    </ul>
                </div>
                
                <div id="lunbo">
                    <div id="lunbo_bg"></div>
                    <div id="lunbo_info"></div>
                    <ul>
                        <li class="on">1</li>
                        <li>2</li>
                        <li>3</li>
                        <li>4</li>
                            
                    </ul>
                    <div id="lunbo_list">
                        <{section name=i loop=$lunbolist}>
                        <a href="<{$lunbolist[i].href}>" target="_blank"><img src="<{$lunbolist[i].src}>" title="<{$lunbolist[i].des}>" alt="<{$lunbolist[i].des}>" /></a>
                        <{/section}>
                        

                    </div>
                    <script>
                        var t = n = 0, count;
                        $(document).ready(function(){    
                            count=$("#lunbo_list a").length;
                            $("#lunbo_list a:not(:first-child)").hide();
                            $("#lunbo_info").html($("#lunbo_list a:first-child").find("img").attr('alt'));
                            //$("#lunbo_info").click(function(){window.open($("#lunbo_list a:first-child").attr('href'), "_blank")});
                            $("#lunbo li").click(function() {
                                var i = $(this).text() - 1;//获取Li元素内的值，即1，2，3，4
                                n = i;
                                if (i >= count) return;
                                $("#lunbo_info").html($("#lunbo_list a").eq(i).find("img").attr('alt'));
                                //$("#lunbo_info").unbind().click(function(){window.open($("#lunbo_list a").eq(i).attr('href'), "_blank")})
                                $("#lunbo_list a").filter(":visible").fadeOut(500).parent().children().eq(i).fadeIn(1000);
                                document.getElementById("lunbo").style.background="";
                                $(this).toggleClass("on");
                                $(this).siblings().removeAttr("class");
                            });
                            t = setInterval("showAuto()", 4000);
                            $("#lunbo").hover(function(){clearInterval(t)}, function(){t = setInterval("showAuto()", 4000);});
                        })

                        function showAuto()
                        {
                            n = n >=(count - 1) ? 0 : ++n;
                            $("#lunbo li").eq(n).trigger('click');
                        }
                    </script>
                    
                </div>
                <div class="logbox">
                    <div class="ann">
                        <div class="mt"><h3>公告</h3></div>
                        <div class="md">
                            <div style="margin:0;">
                            <ul id="line">
                                <{section name=ann loop=$ann}>
                                <li><p style="margin-left: 20px;"><{$ann[ann].title}></p></li>
                                <{/section}>
                            </ul>
                                <p style="text-align: right;margin:10px 10px 0 0 ;">[<a href="<{$config.SITE_URL}>/ann.php">查看详细</a>]</p>
                            </div>
                        </div>
                        <script>
                            $(function(){ 
                                //单行应用@Mr.Think 
                                var _wrap=$('#line');//定义滚动区域 
                                var _interval=2000;//定义滚动间隙时间 
                                var _moving;//需要清除的动画 
                                _wrap.hover(function(){ 
                                clearInterval(_moving);//当鼠标在滚动区域中时,停止滚动 
                                },function(){ 
                                _moving=setInterval(function(){ 
                                var _field=_wrap.find('li:first');//此变量不可放置于函数起始处,li:first取值是变化的 
                                var _h=_field.height();//取得每次滚动高度 
                                _field.animate({marginTop:-_h+'px'},600,function(){//通过取负margin值,隐藏第一行 
                                _field.css('marginTop',0).appendTo(_wrap);//隐藏后,将该行的margin值置零,并插入到最后,实现无缝滚动 
                                }) 
                                },_interval)//滚动间隔时间取决于_interval 
                                }).trigger('mouseleave');//函数载入时,模拟执行mouseleave,即自动滚动 
                            }); 
                        </script>
                    </div>
                    <div class="login">
                        <div class="mt"><h3>我的账户</h3></div>
                        <div class="md">
                            <div id="logform">
                            <{include file="index_login.html"}>
                            </div>
                        </div>
                        
                    </div>
                </div>
                <div class="bigbox">
                    <div class="mt"><h3>最新商品</h3></div>
                    <div class="md">
                        <div class="commolist">
                            <ul>
                            <{section name=i loop=$newcommos}>
                                
                                <li>
                                    <a href="<{$config.SITE_URL}>/commo.php?id=<{$newcommos[i].id}>"><img src="<{$newcommos[i].img}>" width="175" height="190"/></a>
                                    <p style="text-align: center"><a href="<{$config.SITE_URL}>/commo.php?id=<{$newcommos[i].id}>"><{$newcommos[i].name}></a></p>
                                    <p style="text-align: center"><span style="margin-right: 5px;">市场价：<span class="linethrough"><{$newcommos[i].price}>￥</span></span>  <span style="font-weight: bolder;">会员价:<font color="red"><{$newcommos[i].vprice}>￥</font></span></p>
                                    
                                </li>
                                                           
                            <{/section}>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="bigbox">
                    <div class="mt"><h3>促销商品</h3></div>
                    <div class="md">
                        <div class="commolist">
                            <ul>
                            <{section name=i loop=$discount}>
                                
                                <li>
                                    <a href="<{$config.SITE_URL}>/commo.php?id=<{$discount[i].id}>"><img src="<{$discount[i].img}>" width="175" height="190"/></a>
                                    <p style="text-align: center"><a href="<{$config.SITE_URL}>/commo.php?id=<{$discount[i].id}>"><{$discount[i].name}></a></p>
                                    <p style="text-align: center"><span style="margin-right: 5px;">会员价：<span class="linethrough"><{$discount[i].vprice}>￥</span></span>  <span style="font-weight: bolder;">促销价:<font color="red"><{$discount[i].vprice*$discount[i].discount/10}>￥</font></span></p>
                                    
                                </li>
                                                           
                            <{/section}>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="bigbox">
                    <div class="mt"><h3>热卖商品</h3></div>
                    <div class="md">
                        <div class="commolist">
                            <ul>
                            <{section name=h loop=$hotcommos}>
                                
                                <li>
                                    <a href="<{$config.SITE_URL}>/commo.php?id=<{$hotcommos[h].id}>"><img src="<{$hotcommos[h].img}>" width="175" height="190"/></a>
                                    <p style="text-align: center"><a href="<{$config.SITE_URL}>/commo.php?id=<{$hotcommos[h].id}>"><{$hotcommos[h].name}></a></p>
                                    <p style="text-align: center"><span style="margin-right: 5px;">市场价：<span class="linethrough"><{$hotcommos[h].price}>￥</span></span>  <span style="font-weight: bolder;">会员价:<font color="red"><{$hotcommos[h].vprice}>￥</font></span></p>
                                    
                                </li>
                                                           
                            <{/section}>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            
<{include file="foot.html"}>